home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / WWIV Mods / STIPMY.ZIP / STIMP05.MOD < prev    next >
Encoding:
Text File  |  1992-07-30  |  5.5 KB  |  236 lines

  1. ┌────────────────────────────────────────────────────────────────────────┐
  2. │Mod : STIMP05.MOD                                                       │
  3. │Version: WWIV 4.20e                                                     │
  4. │Author : Stimpy #1 @1002 NuclearArmsNET 442-1601                        │
  5. │Description: Combines almost all sysop commands into one menu.          │
  6. │Diffculty: ▓▓▓░░░░░░░                                                   │
  7. │Disclaimer: Always backup your source. If you get an incredible urge to │
  8. │            sautee your cat, it's not my fault!                         │
  9. └────────────────────────────────────────────────────────────────────────┘
  10.  
  11.    = existing line
  12.    + add line
  13.    - deleted line
  14.    * change line
  15.  
  16. In BBS.C
  17.  
  18. Add the following void right before void mainmenu()....
  19.  
  20. void sysopmenu()
  21. {
  22.   int done,i;
  23.   char ch,*s, s1[81],s2[81];
  24.  
  25.   done=0;
  26.   printmenu(5);
  27.   do {
  28.   tleft(1);
  29.   npr("5[3Time left5] 1- 3%s\r\n",ctim(nsl()));
  30.   outstr("7() 1The Devil's Doorknob Sysop Menu: Q,?7(> ");
  31.   ch=onek("ABCDEFGHIJKLMNOPQRSTUVWXYZ?");
  32.   switch(ch) {
  33.     case 'A':
  34.       sysoplog("@ Ran Boardedit");
  35.       boardedit();
  36.       break;
  37.     case 'B':
  38.       sysoplog("@ Ran Diredit");
  39.       dlboardedit();
  40.       break;
  41.     case 'C':
  42.       sysoplog("@ Ran Chainedit");
  43.       chainedit();
  44.       break;
  45.     case 'D':
  46.       sysoplog("@ Ran Gfileedit");
  47.       gfileedit();
  48.       break;
  49.     case 'E':
  50.       nl();
  51.       prt(2,"PW: ");
  52.       echo=0;
  53.       input(s,20);
  54.       echo=1;
  55.       if (strcmp(s,("??????"))==0) { /*Insert any word you like where the
  56.                        ? marks are for a //DOS pw */
  57.     sysoplog("@ Molested DOS");
  58.     shrink_out(getenv("COMSPEC"),1,1,1,0);
  59.     topscreen();
  60.       }
  61.       break;
  62.     case 'F':
  63.       reset_files();
  64.       break;
  65.     case 'G':
  66.       dtr(0);
  67.       sysoplog("@ Reset the computer");
  68.       logoff();
  69.       sl1(1,"");
  70.       if (ok_modem_stuff)
  71.         closeport();
  72.       setvect(INT_SAVE_21,(void interrupt (*) ()) MK_FP(0xffff,0x0000));
  73.       geninterrupt(INT_SAVE_21);
  74.       break;
  75.     case 'H':
  76.       read_new_stuff();
  77.       break;
  78.     case 'I':
  79.       nl();
  80.       prt(1,"What is the filename? ");
  81.       input(s1,50);
  82.       if (s1[0]) {
  83.         if ((okansi()) && (thisuser.defed))
  84.           external_edit(s1,"",thisuser.defed-1,500);
  85.         else
  86.           tedit(s1);
  87.       }
  88.       break;
  89.     case 'J':
  90.       nl();
  91.       prt(1,"What is the filename? ");
  92.       input(s1,50);
  93.       if (s1[0]) {
  94.         nl();
  95.     prt(5,"5Allow editing? ");
  96.     if (yn()) {
  97.       nl();
  98.       load_workspace(s1,0);
  99.     } else {
  100.       nl();
  101.       load_workspace(s1,1);
  102.     }
  103.       }
  104.       break;
  105.     case 'K':
  106.       chuser();
  107.       break;
  108.     case 'L':
  109.       nl();
  110.       npr("5Stack size3: 5%d\r\n",_stklen);
  111.       npr("5Heap free 3: 5%dk\r\n", (int) (farcoreleft()/1024));
  112.       nl();
  113.       break;
  114.     case 'M':
  115.       sysoplog("@ Read all mail");
  116.       mailr();
  117.       break;
  118.     case 'N':
  119.       nl();
  120.       pl(((*(char far *)0x00000417L ^= 0x10) & 0x10) ?
  121.                "3Sysop is now available" :
  122.                "3Sysop is now unavailable");
  123.       sysoplog("@ Changed sysop avail status");
  124.       topscreen();
  125.       break;
  126.     case 'O':
  127.       prstatus();
  128.       break;
  129.     case 'P':
  130.       sysoplog("@ Ran Ivotes");
  131.       ivotes();
  132.       break;
  133.     case 'Q':
  134.       done=1;
  135.       break;
  136.     case 'R':
  137.       sl1(3,s1);
  138.       printfile(s1);
  139.       break;
  140.     case 'S':
  141.       sysoplog("@ Ran Tedit");
  142.       text_edit();
  143.       break;
  144.     case 'T':
  145.       printfile(status.log1);
  146.       break;
  147.     case 'U':
  148.       sysoplog("@ Ran Uedit");
  149.       uedit(usernum,0);
  150.       break;
  151.     case 'V':
  152.       zlog();
  153.       break;
  154.     case 'W':
  155.       voteprint();
  156.       break;
  157.     case 'Z':
  158.       helpl=14;
  159.       if (!cs())
  160.     return;
  161.       nl();
  162.       nl();
  163.       pl("3Which user?");
  164.       outstr(":");
  165.       mpl(30);
  166.       input(s1,30);
  167.       i=finduser1(s1);
  168.       if (i>0) {
  169.     sysoplog("@ Validated user");
  170.     valuser(i);
  171.       } else
  172.     pl("3Sorry there is nobody here by that name!");
  173.     break;
  174.     case '?':
  175.       printmenu(5);
  176.       break;
  177.     }
  178.   } while ((!done) && (!hangup));
  179. }
  180.  
  181. In void mainmenu()
  182.  
  183. Add the following case right after case 'G':
  184.  
  185.       case 'H':
  186.     if ((actsl==255) && (checkpw()))
  187.       sysopmenu();
  188.     else
  189.       pl("1You do not have access to that command");
  190.     break;
  191.  
  192. In void dlmainmenu() add the same case 'H' listed above right after
  193. case 'F':
  194.  
  195. In void mainmenu()
  196. block delete all the //commands except for:
  197.  
  198. /****************************************/
  199.   if (cs()) {
  200.     if (strcmp(s,"PENDING")==0) {
  201.       print_pending_list();
  202.     }
  203.     if (strcmp(s,"NLOG")==0) {
  204.       printfile("NET.LOG");
  205.     }
  206.   }
  207. /*************************************************/
  208.   if ((strcmp(s,"UPLOAD")==0) && (actsl>10))
  209.     upload_post();
  210.   if (strcmp(s,"QSCAN")==0) {
  211.     nl();
  212.     prt(5,"5Do you really want to clear your Q-Scan pointers? ");
  213.     if (yn()) {
  214.       for (i=0; i<33; i++)
  215.  
  216. The only ones you need to delete from dlmainmenu are:
  217.  
  218.   if ((strcmp(s,"DIREDIT")==0) && (so())) {
  219.     sysoplog("@ Ran Diredit");
  220.     dlboardedit();
  221.   }
  222.   if ((strcmp(s,"DOS")==0) && (so())) {
  223.     if (checkpw()) {
  224.       sysoplog("@ Shelled to DOS");
  225.       shrink_out(getenv("COMSPEC"),1,1,1,0);
  226.       topscreen();
  227.     }
  228.   }
  229.  
  230. Then you may want to (you don't have to) go into the boardedit, chainedit,
  231. diredit, etc... files and delete any "(checkpw())" you might find in the
  232. if statements.
  233.  
  234. You will also need to make a new MENU5.ANS/MENU5.MSG
  235.  
  236. Now save and re-compile.